Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: "Refresh Dashboard" only refreshes active tab #20688

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

On a tabbed dashboard, “refresh dashboard” only refreshes the active tab.
Due to performance, charts are not rerendered if their visibility changes, so when switching tabs, you'll get the old values back.

This PR allows the rerendering of the chart if the status changed from the loading status.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

old.mov

After:

new.mov

TESTING INSTRUCTIONS

  1. Create a dataset from SQL lab that can easily be changed Select 1 as "Test"
  2. Save the chart created from that SQL.
  3. Create a Dashboard with 2 tabs
  4. Add any chart to the first tab and the one created in 2 to the second tab.

When you load the dashboard and open the tab from the first time, it should show the value correctly.

  1. Make sure you visit both tabs, then go back to the first one
  2. Change the dataset to Select 2 as "Test"
  3. Refresh the dashboard
  4. Go to the second tab

The chart should display the updated data.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jul 12, 2022

Codecov Report

Merging #20688 (f5198b1) into master (8d4994a) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master   #20688      +/-   ##
==========================================
- Coverage   66.85%   66.83%   -0.03%     
==========================================
  Files        1753     1753              
  Lines       65825    65851      +26     
  Branches     7006     7013       +7     
==========================================
  Hits        44010    44010              
- Misses      20030    20052      +22     
- Partials     1785     1789       +4     
Flag Coverage Δ
javascript 51.92% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../src/dashboard/components/gridComponents/Chart.jsx 55.04% <0.00%> (-1.56%) ⬇️
...perset-frontend/src/addSlice/AddSliceContainer.tsx 59.61% <0.00%> (-7.06%) ⬇️
...set-frontend/src/explore/actions/hydrateExplore.ts 56.00% <0.00%> (-4.00%) ⬇️
superset-frontend/src/dashboard/actions/hydrate.js 2.04% <0.00%> (-0.03%) ⬇️
superset-frontend/src/addSlice/App.tsx 0.00% <0.00%> (ø)
superset-frontend/src/explore/ExplorePage.tsx 0.00% <0.00%> (ø)
...nd/src/views/CRUD/data/dataset/AddDatasetModal.tsx 42.50% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d4994a...f5198b1. Read the comment docs.

@zhaoyongjie zhaoyongjie self-requested a review July 14, 2022 03:51
Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the performance improvement!

@zhaoyongjie zhaoyongjie merged commit 558201c into apache:master Jul 14, 2022
@itziarmj
Copy link
Contributor

itziarmj commented Sep 6, 2023

This still happens to me in version 2.1.0
From which version is this fixed?

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants